﻿using Stark.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Stark.Controllers
{
    public class TaskListController : Controller
    {
        //
        // GET: /TaskList/
        public ActionResult Index()
        {
            List<Task> taskList = new List<Task>();
            //ObservableCollection<Task> taskList = new ObservableCollection<Task>();
            
            taskList.Add(new Task
            {
                Id = "001",
                Name = "Create task list",
                Type = "Feature",
                Status = "Open",
                Description = "Start up the list with new tasks.",
                Created = DateTime.Now,
                Updated = DateTime.Now
            });
            taskList.Add(new Task
            {
                Id = "2",
                Name = "Write more tasks",
                Type = "Feature",
                Status = "Open",
                Description = "Continue work on the list.",
                Created = DateTime.Now,
                Updated = DateTime.Now
            });
            taskList.Add(new Task
            {
                Id = "3",
                Name = "Render list better",
                Type = "Bug",
                Status = "Closed",
                Description = "Rows renders in wrong colors.",
                Created = DateTime.Now,
                Updated = DateTime.Now
            });
            taskList.Add(new Task
            {
                Id = "4",
                Name = "Navigation displays incorrectly",
                Type = "Bug",
                Status = "Open",
                Description = "Renders with bullets, which it shouldn't.",
                Created = DateTime.Now,
                Updated = DateTime.Now
            }); 
            taskList.Add(new Task
            {
                Id = "4",
                Name = "Navigation displays incorrectly",
                Type = "Bug",
                Status = "Open",
                Description = "Renders with bullets, which it shouldn't.",
                Created = DateTime.Now,
                Updated = DateTime.Now
            });
            taskList.Add(new Task
            {
                Id = "4",
                Name = "Navigation displays incorrectly",
                Type = "Bug",
                Status = "Open",
                Description = "Renders with bullets, which it shouldn't.",
                Created = DateTime.Now,
                Updated = DateTime.Now
            });
            taskList.Add(new Task
            {
                Id = "4",
                Name = "Navigation displays incorrectly",
                Type = "Bug",
                Status = "Open",
                Description = "Renders with bullets, which it shouldn't.",
                Created = DateTime.Now,
                Updated = DateTime.Now
            }); 
            taskList.Add(new Task
            {
                Id = "4",
                Name = "Navigation displays incorrectly",
                Type = "Bug",
                Status = "Open",
                Description = "Renders with bullets, which it shouldn't.",
                Created = DateTime.Now,
                Updated = DateTime.Now
            });
            taskList.Add(new Task
            {
                Id = "4",
                Name = "Navigation displays incorrectly",
                Type = "Bug",
                Status = "Open",
                Description = "Renders with bullets, which it shouldn't.",
                Created = DateTime.Now,
                Updated = DateTime.Now
            }); 
            taskList.Add(new Task
            {
                Id = "4",
                Name = "Navigation displays incorrectly",
                Type = "Bug",
                Status = "Open",
                Description = "Renders with bullets, which it shouldn't.",
                Created = DateTime.Now,
                Updated = DateTime.Now
            }); /*   */
            taskList.Add(new Task
            {
                Id = "4",
                Name = "Navigation displays incorrectly",
                Type = "Bug",
                Status = "Open",
                Description = "Renders with bullets, which it shouldn't.",
                Created = DateTime.Now,
                Updated = DateTime.Now
            });    

            return View(taskList);
        }
    }
}
